package com.admin.boot.modules.system.service.impl;

import com.admin.boot.modules.system.entity.SysUser;
import com.admin.boot.modules.system.mapper.SysUserMapper;
import com.admin.boot.modules.system.service.ISysUserService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;


/**
* (SysUser)表服务实现类
*
* @author makejava
* @since 2024-01-12
*/
@Service
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService{


    @Override
    public SysUser getByUsername(String username) {
        LambdaQueryWrapper<SysUser> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysUser::getUsername, username);
        SysUser one = this.getOne(queryWrapper);
        return one;
    }
}
